from rest_framework.response import Response
from rest_framework.status import HTTP_200_OK


class CommonResponse(Response):

    # def __init__(self, ret=0, http_status=HTTP_200_OK, headers=None, **kwargs):
    #     res = {"ret": ret}
    #     res.update(kwargs)
    #     super().__init__(data=res, status=http_status, headers=headers)

    def __init__(self, ret=0, http_status=HTTP_200_OK, headers=None, **kwargs):
        res = {"ret": ret}
        res.update(kwargs)
        super().__init__(data=res, status=http_status, headers=headers)
